<%@page import="edu.hwadee.entity.Staff"%>
<%@page import="edu.hwadee.entity.Area"%>
<%@page import="edu.hwadee.entity.Company"%>
<%@page import="org.springframework.web.context.request.SessionScope"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<%
	if (request.getAttribute("dooptionSS") == null || (boolean) request.getAttribute("dooptionSS") == false) {
%>
<s:action name="showArea" namespace="/jsp"></s:action>
<%
	}
	request.setAttribute("dooptionSS", false);
	
%>
<%
	if (request.getAttribute("dooptionX") == null || (boolean) request.getAttribute("dooptionX") == false) {
%>
<s:action name="showCompany" namespace="/jsp"></s:action>
<%
	}
	request.setAttribute("dooptionX", false);
	
%>

	 <%
	 Staff staff=(Staff)session.getAttribute("staff");
	 Area area=(Area)session.getAttribute("area");
	 Company company=(Company)session.getAttribute("company");
	 String sex;
	if(staff.getSex()==true)	
	{
		sex="男";
	}
	else{
		sex="女";
	}
	// System.out.print(staff.getArea());
	 %>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>完善个人信息</title>

<link href="../css/bootstrap-combined.min.css" rel="stylesheet" type="text/css">
<link href="../css/layoutit.css" rel="stylesheet" type="text/css">
<link href="../css/bootstrap.min.css" rel="stylesheet" type="text/css">
<script src="../js/jquery-2.0.0.min.js"></script>
<script src="../js/jquery-ui.js"></script>
<script src="../js/jquery.htmlClean.js"></script>
<!-- <script src="../js/scripts.js"></script> -->
<script src="../js/bootstrap.min.js"></script>

</head>
<body style="margin:0;padding:0;">
<div class="container-fluid">
	<div class="row-fluid">
		<div class="span12">
			<div class="navbar navbar-inverse">
				<div class="navbar-inner">
					<div class="nav-collapse collapse navbar-responsive-collapse">
						<a class="btn btn-navbar" data-target=".navbar-responsive-collapse" data-toggle="collapse"></a> <a class="brand" href="./ILIP_Customer_Main.html">攀枝花物流平台</a>
						<ul class="nav pull-right">
							<li>
								<span class="badge">1</span>
							</li>
							<li>
								<a href="#">物流信息</a>
							</li>
							<li class="divider-vertical">
							</li>
							<li>
								 <div class="btn-group btn-inverse">
                  <button class="btn btn-inverse"><%= staff.getTrueName() %></button>
                  <button data-toggle="dropdown" class="btn dropdown-toggle btn-inverse"><span class="caret"></span></button>
                  <ul class="dropdown-menu">
                    <li><a href="./ILIP_Customer_PersonCenter_Account.jsp">个人中心</a></li>
                    <li><a href="#">设置</a></li>
                    <li><a href="#">帮助</a></li>
                    <li><a href="./Login_Register.jsp">退出登录</a></li>
                  </ul>
                </div>
							</li>
						</ul>
					</div>
					
				</div>
			</div>
			
			
		</div>
	</div>
	

	<div class="row-fluid" style="padding-top:4%;">
		<div class="span2">
			<div align="center">
			<img alt="140x140" src="../img/5.jpg" class="img-circle" />
			</div>
			<div style="padding-top:10px;">
			<ul class="nav nav-list">
				<li class="nav-header">个人信息</li>
						<li class="active"><a
							href="./ILIP_Customer_PersonCenter_Account.jsp">账号信息</a></li>
						<li><a href="./ILIP_Customer_PersonCenter_PersonInfo.jsp">完善个人信息</a>
						</li>
						<li class="nav-header">物流平台</li>
						<li><a href="./ILIP_Customer_PersonCenter_MyOrder.html">我的订单</a>
						</li>
						<li><a href="#">物流信息</a></li>
						<li><a href="./ILIP_Customer_PersonCenter_MyLogistice.html">我的物流需求</a>
						</li>
						<li><a href="./ILIP_Customer_PersonCenter_MyGoods.html">我的货源</a>
						</li>
						<li class="divider"></li>
						<li><a href="#">帮助</a></li>
			</ul>
			</div>
		</div>
		<div  align="center" class="span10" style="margin-top:2%;margin-bottom:100px;">
			<table >
				<tr>
					<td>真实姓名：</td>
					<td><input type="text" value="<%= staff.getTrueName() %>" name="trueName" readonly="readonly"></td>
				</tr>
				<tr>
					<td>性别：</td>
					<td><input type="text" value="<%= sex %>" name="company" readonly="readonly">
					</td>
				</tr>
				<tr>
					<td>出生时间：</td>
					<td><input type="text" value="<%= staff.getBorn() %>" name="born" readonly="readonly"></td>
				</tr>
				<tr>
					<td>联系方式：</td>
					<td><input type="text" value="<%= staff.getPhoneNumber() %>" name="phoneNumber" readonly="readonly"></td>
				</tr>
				<tr>
					<td>住址：</td>
					<td><input type="text" value="<%= staff.getArea().getAreaName() %>" name="address" readonly="readonly"></td>
				</tr>
				<tr>
					<td>归属单位：</td>
					<td><input type="text" value="<%= staff.getCompanyByCompany().getCompanyName() %>" name="company" readonly="readonly"></td>
				</tr>
				<tr>
					<td>文化程度：</td>
					<td>
					<input type="text" value="<%= staff.getEducation() %>" name="education" readonly="readonly">
					</td>
				</tr>
				<tr>
					<td>政治面貌：</td>
					<td>
					<input type="text" value="<%= staff.getPolicy()%>" name="policy" readonly="readonly">
					</td>
				</tr>
				
				<tr>
					<td>身份证编号：</td>
					<td><input type="text" value="<%= staff.getIdnumber() %>" name="idnumber" readonly="readonly"></td>
				</tr>
				<tr>
					<td>参加工作时间：</td>
					<td><input type="text" value="<%= staff.getWorkDate() %>" name="workDate" readonly="readonly"/></td>
				</tr>
				<tr align="center">
					<td colspan="2"><a role="button" class="btn" data-toggle="modal"
													onclick="update('${staff.getStaffId()}')">修改个人信息</a></td>
				</tr>
			</table>
		</div>
	<!-- 修改个人信息 -->
		<div id="update_staff_info" class="modal hide fade"
					role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal"
									aria-hidden="true" >×</button>
					<h3 id="myModalLabel">修改个人信息</h3>
			</div>
				<form action="updateStaff" method="post">
						<div class="modal-body">
							<table >
							<tr>
					
					<td><input type="hidden" value="<%= staff.getStaffId() %>" name="staffId" required="required"></td>
				</tr>
				<tr>
					<td><input type="hidden" value="<%= staff.getStaffName() %>" name="staffName" required="required"/></td>
				</tr>	
				<tr>
					
					<td><input type="hidden" value="<%= staff.getPower() %>" name="power" required="required"/></td>
				</tr>	
				<tr>
					
					<td><input type="hidden" value="<%= staff.getProperty() %>" name="property" required="required"/></td>
				</tr>	
				<tr>
					
					<td><input type="hidden" value="<%= staff.getPassword() %>" name="password" required="required"/></td>
				</tr>		
				
				
				<tr>
					<td>真实姓名：</td>
					<td><input type="text" value="<%= staff.getTrueName() %>" name="trueName" required="required"></td>
				</tr>
				
				<tr>
					<td>身份证号码：</td>
					<td><input type="text" value="<%= staff.getIdnumber() %>" name="idnumber" required="required"/></td>
				</tr>
				
							
				<tr>
					<td>性别：</td>
					<td><select name="sex">
						<option value="true">男</option>
						<option value="false">女</option>
					</select></td>
				</tr>
				<tr>
					<td>出生时间：</td>
					<td><input type="date" value="<%= staff.getBorn() %>" name="born" required="required"></td>
				</tr>
				<tr>
					<td>联系方式：</td>
					<td><input type="text" value="<%= staff.getPhoneNumber() %>" name="phoneNumber" required="required"></td>
				</tr>
				<tr>
					<td>住址：</td>
					<td><s:select name="address" list="#session.arealist"
								listKey="#this.areaId" listValue="#this.areaName"
								headerKey="" headerValue="请选择"></s:select></td>
				</tr>		
				
				
				<tr>
					<td>归属单位：</td>
					<td>
					<s:select name="companyId" list="#session.companylist"
								listKey="#this.companyId" listValue="#this.companyName"
								headerKey="" headerValue="请选择"></s:select>
					</td>
				</tr>
				<tr>
					<td>文化程度：</td>
					<td><select name="education">
						<option value="高中">高中</option>
						<option value="本科">本科</option>
						<option value="硕士">硕士</option>
						<option value="博士">博士</option>
					</select></td>
				</tr>
				<tr>
					<td>政治面貌：</td>
					<td><select name="policy">
						<option value="群众">群众</option>
						<option value="团员">团员</option>
						<option value="党员">党员</option>
					</select></td>
				</tr>
				
				<tr>
					<td>参加工作时间：</td>
					<td><input type="date" value="<%= staff.getWorkDate() %>" name="workDate" required="required"/></td>
				</tr>
			</table>				
						</div>
						<div class="modal-footer">
							<button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
							<input type="submit" class="btn btn-primary" value="确认修改">
						</div>
				</form>
		</div>


			<div class="footer2018Box" align="center" style="margin-top:2%;">
    <p><a rel="nofollow" href="#" >关于攀枝花物流平台</a><em>|</em><a href="" >网站导航</a><em>|</em><a rel="nofollow" href="" >客服中心</a> <em>|</em><a rel="nofollow" href="" >法律声明</a><em>|</em><a rel="nofollow" href="" >广告服务</a> <em>|</em><a href="#">友情链接</a><em>|</em><a href="#" >市场变动</a><em>|</em><a href="#" >知识天地</a></p>
    <p><span>客服咨询热线：000-0000-0000 ( 免长途费 )&nbsp;&nbsp;</span><span>工作时间：8:00 - 19:00</span></p>
    <p>网络备案编号：000000000001</p>
    <p>Copyright©2000-2018ILIP.All Rights Reserved</p>
</div>
		</div>
	</div>

</body>
	<script type="text/javascript">
	$("#update_staff_info").modal("hide");
	function update(staffId) {
		$("#update_staff_info").modal("show");
		document.getElementById("staffId").value = staffId;
	}
		
	</script>
</html>